﻿Imports CommonLayer

Public Class frmAccountingObjectDetail
    Inherits frmBaseDictionaryDetail

#Region "Declaration"

#End Region

    Public Overrides ReadOnly Property PermissionID() As PermissionEnum
        Get
            Return PermissionEnum.AccountingObject
        End Get
    End Property

#Region "Property"

#Region "Show/Hide Tool "

#End Region

#End Region

#Region "Contructor"

#End Region

#Region "Public"

    Protected Overrides Sub SetEnableControl(ByVal bEnable As Boolean)
        MyBase.SetEnableControl(bEnable)
        txtAddress.ReadOnly = Not bEnable
        txtAccountingObjectCode.ReadOnly = Not bEnable
        txtAccountingObjectName.ReadOnly = Not bEnable
        txtAddress.ReadOnly = Not bEnable
        txtTel.ReadOnly = Not bEnable
        cboAccountingObjectCategory.ReadOnly = Not bEnable
        txtBankAccount.ReadOnly = Not bEnable
        txtBankName.ReadOnly = Not bEnable
        txtTaxCode.ReadOnly = Not bEnable
        txtContactName.ReadOnly = Not bEnable
        txtEmail.ReadOnly = Not bEnable
        txtFax.ReadOnly = Not bEnable
    End Sub

#Region "InitData"

    ''' <summary>
    ''' Hien thi du lieu cho cac combo
    ''' </summary>
    Protected Overrides Sub InitDataToCombo()
        MyBase.InitDataToCombo()
        bsAccountingObjectCategory.DataSource = dsDictionary
        bsAccountingObjectCategory.Sort = dsDictionary.AccountingObjectCategory.AccountingObjectCategoryNameColumn.ColumnName
        CommonFunction.RefineCombo(cboAccountingObjectCategory)
    End Sub

    Protected Overrides Function InitAddNewRow() As DataRow
        If Me.m_firstFocusControl Is Nothing Then
            Me.m_firstFocusControl = txtAccountingObjectCode
        End If
        Return oBLDictionary.AddNewAccountingObject()
    End Function

#End Region

#Region "Validate"

#End Region

#Region "Others"

#End Region

#Region "Private Method"


#End Region

#End Region

#Region "Events"


#End Region


End Class
